import request from "@/utiles/request"
//注册功能
export function register(data) {
  return request({
    url:'/index/reg',
		method:'POST',
		data:data
  })
}

//登录功能
export function login(data) {
  return request({
    url:'/index/login',
		method:'POST',
		data:data
  })
}


//user功能
export function userInfo(params){
  return request({
    url:'/user/getUserInfo',
		method:'GET',
		params:params
  })
}

//修改用户功能

export function userUpdate(data){
  return request({
    url:'/user/update',
		method:'POST',
		data:data
  })
}

//======================首页====================
//轮播图功能
export function indexBanner(params){
  return request({
    url:'/index/index',
		method:'GET',
		params:params
  })
}
//热门推荐功能
export function indexHot(params){
  return request({
    url:'/index/hot',
		method:'GET',
		params:params
  })
}
//最近更新功能
export function indexNew(){
  return request({
    url:'/index/new',
		method:'GET',
		params:{page:1,limit:10}
  })
}

//详情页面功能
export function indexShow(id){
  return request({
    url:'/index/show',
		method:'GET',
		params:{id}
  })
}